package com.terren.spider.core.html.configuration;

public enum DynamicType {
	DYNAMIC_DISENABLE(0,false), //未启用 代理动态加载内容
	DYNAMIC_ENABLE(1,true);    //启用

	private int typeValue;
	private boolean dynamic;

	DynamicType(int typeValue,boolean dynamic) {
		this.typeValue = typeValue;
		this.dynamic = dynamic;
	}

	public static DynamicType valueOfType(int typeValue) {
		for (DynamicType datatype : values()) {
			if (datatype.typeValue == typeValue) {
				return datatype;
			}
		}
		return DYNAMIC_DISENABLE;
	}

	public int getTypeValue() {
		return typeValue;
	}

	public void setTypeValue(int typeValue) {
		this.typeValue = typeValue;
	}

	public boolean isDynamic() {
		return dynamic;
	}

	public void setDynamic(boolean dynamic) {
		this.dynamic = dynamic;
	}
	
}
